package com.timsmeet.timeperiod;

/*
 * TimeBlock implements the interface TimePeriod and defines the time period by Start and Duration; 
 * the End is being calculated:
 * 
 * 
 *                                                                                                                                                                     
                                 +--------------+                                                                                                                                   
                                 |  TimeBlock   |                                                                                                                                   
                                 +--------------+                                                                                                                                   
                                 |              |                                                                                                                                   
                             |   |          |   |                                                                                                                                   
                             |<--|          |<--|                                                                                                                                   
                change       +--------------+   |                                                                                                                                   
                start        |              |   |                                                                                                                                   
                             +--------------+   |                                                                                                                                   
                                 |              |                                                                                                                                   
                                 |   |          |   |                                                                                                                               
                                 |-->|          |-->|                                                                                                                               
                change           |   +--------------+                                                                                                                               
                end              |   |              |                                                                                                                               
                                 |   +--------------+                                                                                                                               
                                 |              |                                                                                                                                   
                                 |              |   |                                                                                                                               
                                 |<-------------|-->|                                                                                                                               
                change           +------------------+                                                                                                                              
                duration         |                  |                                                                                                                              
                                 +------------------+                                                                                                                               
                                                                                                                                                                                    


A TimeBlock can be created with Start/End, Start/Duration, or Duration/End. 
As above, Start and End will be automatically sorted if necessary.
 */


public interface TimeBlock extends TimePeriod {
	void durationFromStart(TimeInterval newDuration);
	void durationFromEnd(TimeInterval newDuration);
	TimeBlock getIntersection(TimePeriod period);
}
